package com.ztgf.logistics.models.service.deppon;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.ztgf.common.constant.Result;
import com.ztgf.common.enums.CodeEnum;
import com.ztgf.logistics.models.bo.deppon.LogisticsOrderBO;
import com.ztgf.logistics.models.bo.deppon.LogisticsOrderEditBO;
import com.ztgf.logistics.models.bo.deppon.LogisticsOrderSaveBO;
import com.ztgf.logistics.models.bo.deppon.api.DepponBudgetBO;
import com.ztgf.logistics.models.bo.deppon.api.DepponPushOrderBO;
import com.ztgf.logistics.models.bo.deppon.api.DepponWebsiteBO;
import com.ztgf.logistics.models.dto.deppon.LogisticsOrderDTO;
import com.ztgf.logistics.models.vo.ExportAdminLogisticsOrderListVO;
import com.ztgf.logistics.models.vo.ExportLogisticsOrderListVO;
import com.ztgf.logistics.models.vo.deppon.LogisticsOrderVO;
import com.ztgf.logistics.models.vo.deppon.api.DepponBudgetVO;
import com.ztgf.logistics.models.vo.deppon.api.DepponWebsiteListVO;
import com.ztgf.logistics.models.vo.deppon.api.DepponWebsiteVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;

/**
 * 物流订单表服务
 *
 * @author mxli
 * @Date 2021-09-13 22:15:56
 */
public interface ILogisticsOrderService extends IService<LogisticsOrderDTO> {
    void add(LogisticsOrderSaveBO saveBO);
    void updateMailNo(String logisticId, String mailNo, CodeEnum codeEnum);

    Result<LogisticsOrderVO> get(Long id);
    Result<Page<LogisticsOrderVO>> queryPageList(LogisticsOrderBO bo);

    Result update(LogisticsOrderEditBO saveBO);

    Result saveCancel(Long id, String remark);

    List<ExportLogisticsOrderListVO> queryExportList(String ids);
    List<ExportAdminLogisticsOrderListVO> queryAdminExportList(String ids);


    /**
     * 网点查询
     * @param bo
     * @return
     */
    Result<DepponWebsiteListVO> queryWebsiteList(DepponWebsiteBO bo);

    /**
     * 价格试算
     * @param bo
     * @return
     */
    Result<List<DepponBudgetVO>> saveBudget(DepponBudgetBO bo);

    /**
     * 同步德邦订单信息
     * @param id
     * @return
     */
    Result saveSync(Long id);

    /**
     * 同步业务订单
     * @param id
     * @return
     */
    Result saveSyncBusiness(Long id);

    /**
     * 通知回调
     * @param bo
     */
    void saveDoNotify(DepponPushOrderBO bo);

    /**
     * 根据运单号查询
     * @param mailNo
     * @return
     */
    LogisticsOrderDTO getByMailNo(String mailNo);

    boolean updateBillMoney(Long id, BigDecimal money);
}
